-- GENERATED SPELL FOR [Krethis Shadowspinner] --


function spell0_12433(pUnit, Event) --@Shadow Shield,n/a--
pUnit:FullCastSpellOnTarget(12040,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12433', 30316, 1)
end

function spell1_12433(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12433', 628, 1)
end

function Sorts_12433(pUnit, Event)
local choix_sorts_12433 = math.random(0, 1)
if choix_sorts_12433 == 0 then
pUnit:RegisterEvent('spell0_12433', 1, 1)
end
if choix_sorts_12433 == 1 then
pUnit:RegisterEvent('spell1_12433', 1, 1)
end
end

function mob12433_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12433', math.random(1500, 3000), 1)
end

function mob12433_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12433_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12433_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12433, 1, 'mob12433_Action')
RegisterUnitEvent(12433, 2, 'mob12433_Leave')
RegisterUnitEvent(12433, 3, 'mob12433_Kill')
RegisterUnitEvent(12433, 4, 'mob12433_Die')
